From 23253afe1c2f2c91c3e3a882545b47a453742ba4 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 24 Apr 2001 03:14:58 +0000 Subject: [PATCH] (eshell-smart-redisplay): Added some safety code to work around a redisplay problem I've been having. --- lisp/eshell/em-smart.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/eshell/em-smart.el b/lisp/eshell/em-smart.el index 9bef8b10d20..0d7810df9e2 100644 --- a/lisp/eshell/em-smart.el +++ b/lisp/eshell/em-smart.el @@ -262,7 +262,11 @@ and the end of the buffer are still visible." (defun eshell-smart-redisplay () "Display as much output as possible, smartly." (if (eobp) - (recenter -1) + (save-excursion + (recenter -1) + ;; trigger the redisplay now, so that we catch any attempted + ;; point motion; this is to cover for a redisplay bug + (eshell-redisplay)) (let ((top-point (point))) (and (memq 'eshell-smart-display-move pre-command-hook) (>= (point) eshell-last-input-start) -- 2.30.2